package cz.possoft.serializable.dama.figurky;

import java.io.Serializable;

import cz.possoft.serializable.dama.game.DamaPole;

/**
  * Abstraktni figurka pro hru dama. Muze to byt kamen
  * nebo prazdna figurka (prazdne pole na sachovnici)
  *
  * @author mara
  */
public abstract class DamaFigurka implements Serializable {
	
	public static final long serialVersionUID = 513949789;	

    // aktualni souradnice dane figurky. Moznosti jsou 0...7
    private int x;
    private int y;

    // barva dane figurky
    // 1 - cerna, 2 - bila, 0 - prazdne pole
    private int color;

    // je figurka oznacena pro tah?
    private boolean markedForPlay = false;

    // je figurka oznacena prstencem (je nad ni mys)?
    private boolean ring = false;

    // sachovnice na ktere je dana figurka
    private DamaPole sachovnice;

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getColor() {
		return color;
	}

	public void setColor(int color) {
		this.color = color;
	}

	public boolean isMarkedForPlay() {
		return markedForPlay;
	}

	public void setMarkedForPlay(boolean markedForPlay) {
		this.markedForPlay = markedForPlay;
	}

	public boolean isRing() {
		return ring;
	}

	public void setRing(boolean ring) {
		this.ring = ring;
	}

	public DamaPole getSachovnice() {
		return sachovnice;
	}

	public void setSachovnice(DamaPole sachovnice) {
		this.sachovnice = sachovnice;
	}
	
	// vraci true jestli figurka muze tahnout na cilove pole
    public abstract boolean muzeTahnout(int xCil, int yCil);
    
    // jmeno figurky - kvuli hlasce o poslednim tahu
    public abstract String getFigurkaName();
    
}
